package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.LocalQualifiedName;

/**
 * @author Bright Lee
 */
public final class OpenStatement implements SqlDataStatement, Statement {

    private int beginIndex;
    private int endIndex;
    private LocalQualifiedName cursorName;

    public OpenStatement(int beginIndex, LocalQualifiedName cursorName) {
        this.beginIndex = beginIndex;
        this.endIndex = cursorName.getEndIndex();
        this.cursorName = cursorName;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public LocalQualifiedName getCursorName() {
        return cursorName;
    }

}
